<?php ?>
<script>
    function PageValidator() {
        var CustomerInfo = document.CustomerInfo;
        if(CustomerInfo.card_id.value == '') {
            alert('银行卡号没有填写！');
            CustomerInfo.card_id.focus();
            return false;
        }
        if(CustomerInfo.password.value == '') {
            alert('密码没有填写！');
            CustomerInfo.password.focus();
            return false;
        }
        return true;
    }
</script>

<div id="locate">
    <span id="topnav"><a href="./">首页</a> &raquo; 柜台结帐</span>
</div>
<div id="chanr">
    <div class="mallLogin"><span class="welcome">柜台结帐</span></div>
</div>
<div id="chanl" style="margin-top:5px;">
    <div id="order_info">
        <div id="ordersuccess">
            &#8226; 订购清单如下:
        </div>
		﻿<table border="1" width="100%" bordercolor="#CEE3D0" cellspacing="0" cellpadding="0" style=" border:1px solid #7ECEF4;border-collapse:collapse; margin:0px; padding:0px;">
            <tr>
                <td width="100%" align="center">
                    <table  width="100%" height="92" cellspacing="1" cellpadding="1" >
                        <tr BGCOLOR=#CEE3D0 >
                            <td WIDTH=600 height="28" align="center"></td>
                            <td WIDTH=600 height="28" align="center"><font size="2">编&nbsp;号</font></td>
                            <td WIDTH=600 height="28" align="center"><font size="2">产&nbsp;品&nbsp; 名&nbsp; 称</font></td>
                            <td WIDTH=600 height="28" align="center"><font size="2">数量</font></td>
                            <td WIDTH=600 height="28" align="center"><font size="2">单价</font></td>
                            <td WIDTH=600 height="28" align="center"><font size="2">总价</font></td>
                        </tr>
                        <?php $totalPrice = 0; ?>
                        <?php foreach ($this->carts as $cart): ?>

                            <tr bgcolor="#EAF7EC" align="center">
                                <td width="600" height="1" >
                                    <img src="<?php echo "/upload/" . $cart->getProductID() ?>" width="40" alt="image" onerror="this.src='/images/nopic.gif'" /></td>
                                <td width="600" height="1" align="center"><?php echo $cart->getProductID() ?></td>
                                <td width="600" height="1" ><?php echo $cart->getProductName() ?></td>
                                <td width="600" height="1" ><?php echo $cart->getNumber() ?></td>
                                <td width="600" height="1" ><?php echo $cart->getPrice() ?></td>
                                <td width="600" height="1" >
                                <?php
                                $price = $cart->getNumber() * $cart->getPrice();
                                $totalPrice = $price + $totalPrice;
                                echo ($price);
                                ?>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                                <tr bgcolor="#EAF7EC">
                                    <td colspan="9" width="600" height="28" align="right">
                                        合计:￥<?php echo $totalPrice ?>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <form method="post" action="/order/buy"  onsubmit="return PageValidator()" name="CustomerInfo" >
        <div id="ordersuccess">
            &#8226; <b>请填写您的网上银行信息（我们会对您的信息严格保密）</b>
        </div>
        <table border="1" style="border:1px solid #7ECEF4; padding:0px;" width="100%" cellspacing="0" cellpadding="0" bordercolordark="#ecf5ff" bordercolorlight="#9BBDE3" height="258">
            <tr>
                <td width="100%" height="256">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%" height="261">
                        <tr>
                            <td width="153" height="30" align="right" valign="middle" bgcolor="#ecf5ff" style="text-align:right; font-size:14px;">
                                * 卡号:&nbsp;&nbsp;
                            </td>
                            <td width="443" bgcolor="#ecf5ff" height="31">
                                <input size="27" name="card_id" value="" maxlength="20" >
                                <font color="red">*</font>
                            </td>
                        </tr>
                        <tr>
                            <td width="153" height="30" align="right" valign="middle" bgcolor="#ecf5ff" style="text-align:right; font-size:14px;">
				  * 密码:&nbsp;&nbsp;
                            </td>
                            <td width="443" bgcolor="#ecf5ff" height="30">
                                <input type="password" size="41" name="password" value="" maxlength="50">
                                <font color="red">*</font></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table><br />
        <input style="FONT-SIZE: 9pt; COLOR: blue" onclick="setUserShopFrame('');myshow('usershop');callLoad('loadingiframe');" type="button" width="55" value="修改订单" />
        <input style="FONT-SIZE: 9pt; COLOR: blue" type="submit" width="55" value="结帐送出" />
    </form>
</div>
<div class="cl"></div>